projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d83b3ec
)
(get_frame_dc): Avoid changing the palette on an invalid frame.
author
Jason Rumney
<jasonr@gnu.org>
Fri, 1 Dec 2000 20:06:39 +0000
(20:06 +0000)
committer
Jason Rumney
<jasonr@gnu.org>
Fri, 1 Dec 2000 20:06:39 +0000
(20:06 +0000)
src/w32xfns.c
patch
|
blob
|
history
diff --git
a/src/w32xfns.c
b/src/w32xfns.c
index 9624e0dd4eb4101f8176b2b25aa65c25fdc03dca..018aefdf35ed6714e36f59b3cc5f2d8ec9dc072d 100644
(file)
--- a/
src/w32xfns.c
+++ b/
src/w32xfns.c
@@
-117,7
+117,11
@@
get_frame_dc (FRAME_PTR f)
enter_crit ();
hdc = GetDC (f->output_data.w32->window_desc);
- select_palette (f, hdc);
+
+ /* If this gets called during startup before the frame is valid,
+ there is a chance of corrupting random data or crashing. */
+ if (hdc)
+ select_palette (f, hdc);
return hdc;
}